import { LocalStorageManager } from "../../cache";
import { TokenInfo } from "./login.type";
const localStorageManager = new LocalStorageManager();
export const setToken = (data: TokenInfo) => {
  localStorageManager.setItem("token", data.token, (data.expire || 0) * 1000);
  localStorageManager.setItem(
    "refreshToken",
    data.refreshToken,
    (data.refreshExpire || 0) * 1000
  );
};
